/**
 * Created by mac on 2018/1/4.
 */
import React, { Component } from 'react';
import { StyleSheet, View } from 'react-native';
import { TextArea } from 'iftide'


export default class Basic1 extends Component {
    constructor(props) {
        super(props);
    }

    render() {
        return (
            <View>
                <TextArea
                    type={'normal'}
                    placeholder={'请至少输入十个字符（字数统计）'}
                    maxLength={1000}
                    minLength={10}
                    rows={3}
                    onChange={(text)=>{console.log(text.replace(/(\n|\r|\r\n)/g,'aa'))}}
                    showErrorInfo={true}
                    errorInfo={'请至少输入10个字'}
                />
                <View style={styles.divider} />
                <TextArea
                    type={'normal'}
                    placeholder={'请至少输入十个字符'}
                    showClearIcon={true}
                    maxLength={100}
                    minLength={10}
                    rows={5}
                    nolineChange
                    keyboardType='numbers-and-punctuation'
                    showCount={false}
                    showErrorInfo={true}
                    errorInfo={'请至少输入10个字'}
                />
                <View style={styles.divider} />
            </View>
        );
    }
}
const styles = StyleSheet.create({
    divider: {
        height: 20,
        backgroundColor: '#F5F7F9',
    }
});